<template>
  <section class="basic-panel">
    <h4 v-if="title" class="panel-title">
      <span class="text">{{ title }}</span>
    </h4>
    <div class="panel-main">
      <slot></slot>
    </div>
  </section>
</template>

<script  setup>
import { toRefs } from 'vue'

const props = defineProps({
  title: {
    type: String,
    default: ''
  },
  type: {
    type: Boolean,
    default: false
  }
})
const { title, type,  } = toRefs(props)
</script>

<style lang="scss" scoped>
.basic-panel {
  width: 100%;
  min-height: 0;
  font-size: 14px;
}

.panel-title {
  top: 0;
  left: 0;
  width: 100%;
  font-size: 18px;
  height: 36px;
  padding-left: 40px;
  color: #ffffff;
  font-family: 'YouSheBiaoTiHei';
  background-image: url('./imgs/title-bg.svg');
  background-repeat: no-repeat;
  //background-size: 100% 100%;
  background-position:  0px center;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: 20px;
  margin-bottom: 8px;
  padding-bottom: 3px;
}

.panel-main {
  //height: 100%;
  //min-height: 200px;
  padding: 10px;
  //border-image: url("./imgs/panel-source.svg") 10 fill / 10px;
  //background-color: rgba(19, 141, 255, 0.1);
  backdrop-filter: blur(5px);
  border-image-repeat: stretch;
}

</style>
